package com.zte.claa.inficombo.csa.app.service.photo.bean;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/*
 * Author by 0283000106 
 */
public class PhotoDataModel {
	// 图片ID
	private String photoid;
	// 摄像头传感器标识
    private String sensoreui;
    // 照片基本信息
    private PhotoFileBaseInfo photebase;
    // 照片心跳信息
    private PhotoFileHBInfo photohb;
    // 照片分包信息
    private Map<Integer, PhotoFragPacket> fragPacketMap;
    // 对象创建时间
    private Timestamp dataOrgRptTime;
    
    public PhotoDataModel(){
    	this.photoid = ""+Math.abs(UUID.randomUUID().getLeastSignificantBits());
    	this.fragPacketMap = new HashMap<Integer, PhotoFragPacket>();
    	this.dataOrgRptTime = new Timestamp(System.currentTimeMillis()); 
    }
    
	public String getPhotoid() {
		return photoid;
	}

	public void setPhotoid(String photoid) {
		this.photoid = photoid;
	}

	public String getSensoreui() {
		return sensoreui;
	}
	
	public void setSensoreui(String sensoreui) {
		this.sensoreui = sensoreui;
	}
	
	public PhotoFileBaseInfo getPhotebase() {
		return photebase;
	}
	
	public void setPhotebase(PhotoFileBaseInfo photebase) {
		this.photebase = photebase;
	}
	
	public PhotoFileHBInfo getPhotohb() {
		return photohb;
	}

	public void setPhotohb(PhotoFileHBInfo photohb) {
		this.photohb = photohb;
	}

	public Map<Integer, PhotoFragPacket> getFragPacketMap() {
    	if(null == fragPacketMap){
    		return new HashMap<Integer, PhotoFragPacket>();
    	}else{
    		return this.fragPacketMap;
    	}
	}

	public Timestamp getDataOrgRptTime() {
		return dataOrgRptTime;
	}    
}
